<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ES6 for-of</title>
</head>
<body>
<script>


    var obj = {a: '', b: ''};
    const arr = [{}];
    obj[Symbol.iterator] = arr[Symbol.iterator].bind(arr);

    for (let a of obj) {
        console.log(a);
    }


    let set = new Set([1, 2, 3]);
    set.forEach((value, key) => console.log(value * 2) );
</script>
</body>
</html>